union find algorithm python

visit shbcf.ru